<?php
Zend_Loader::loadFile('../application/default/models/Common.php');
class Form_Userform extends Zend_Form
{
    public function __construct($options=array())
    {
        parent::__construct($options);

      $this->setName("Userpostingform");
      $this->setAttrib('id', 'Userpostingform');
     // $this->setID("Userpostingform");
        $this->setMethod('post');
        if($options["action"]=="add" || $options["action"]=="doadd")
        {
             $this->setAction('/admin/User/doadd/');
        }
        else{
            $this->setAction('/admin/User/doedit/');
        }
        
        $this->addPrefixPath('AML_Form_Element', '../library/Form/Element/', 'element');

     	$title = new Zend_Form_Element_Text('admin_firstname');
        $title ->setLabel('First Name* :')
          ->setRequired(true)
          ->setAllowEmpty(false)
          ->setOptions(array('class'=>'inputbox'));
           $this->addElement($title);

        
       
          $this->addElement('text', 'admin_lastname', array(
        'label'      => 'Last Name:',
        'filters'    => array('StringTrim'),
        'class'			 => 'inputbox',
        'validators' => array(
        array('validator' => 'StringLength', 'options' => array(0, 50)),
        
        )
        ));


          $this->addElement('text', 'admin_email', array(
        'label'      => 'Email:',
        'filters'    => array('StringTrim'),
        'class'			 => 'inputbox',
        'validators' => array(
        array('validator' => 'StringLength', 'options' => array(0, 50)),

        )
        ));

          $this->addElement('text', 'admin_username', array(
        'label'      => 'User  Name:',
        'filters'    => array('StringTrim'),
        'class'			 => 'inputbox',
        'validators' => array(
        array('validator' => 'StringLength', 'options' => array(0, 50)),

        )
        ));

            $this->addElement('password', 'admin_password', array(
        'label'      => 'Password:',
        'filters'    => array('StringTrim'),
        'class'			 => 'inputbox',
        'validators' => array(
        array('validator' => 'StringLength', 'options' => array(0, 50)),

        )
        ));

        /*   	$hotel_facility_en = $this ->addElement('Lion_Form_Element', 'hotel_facility_en',
    				array('label' =>'Facilities(english):',
    					'validators' =>array(
    					array('validator' =>'StringLength', 'options' =>array(0, 1000))
    				),
		)); 
*/
      //$this->addElement('textarea','full_text', array('label' => 'Article Text', 'rows' => '5' ));

     
      	$catid = new Zend_Form_Element_Select('admin_userType');
        $catid ->setLabel('User Role* :')
          ->setRequired(true)
		 			 ->addMultiOptions(array(
		 			    '' => 'Select User Type',
						'admin' => 'Admin',
						'supervisor' => 'Supervisor',
                                                'consultant'=>'Consultant'
                                               ));
		$catid->setOptions(array('class'=>'inputbox'));
		$this->addElement($catid);

      $state = new Zend_Form_Element_Select('admin_status');
        $state ->setLabel('Status')
		 			 ->addMultiOptions(array(
		 			    '' => 'Select Status',
						1 => 'Active',
						0 => 'De Active'));
		$state->setOptions(array('class'=>'inputbox'));
		$this->addElement($state);

    
 


     /* $this->addElement('submit', 'save', array(
        'label'      => 'Save:',
        'filters'    => array('StringTrim'),
        'class'			 => 'input-2',
        'validators' => array(
        array('validator' => 'StringLength', 'options' => array(0, 50))
        )
        ));*/

       $this->addElement('hidden', 'admin_id', array(
     
        'filters'    => array('StringTrim'),
        'class'			 => 'input-2',
        'validators' => array(
        array('validator' => 'StringLength', 'options' => array(0, 50))
        )
        ));


}

		
 

    
}
